<?php
class Index extends Controller {
	public function html() {
		$mUser = new User_model();
		$currUser = $mUser->currUser();
		if(!$currUser) header('Location:/auth/login?backurl='.urlencode('/yunying/page/category/'));
		
		$data = array();
		$tpl = 'yunying/page/category/index.html';
		
		$page = $this->get('page', 'str', 1);
		$size = 20;
		$mArticle = new Article_model();
		$data['category'] = $mArticle->categoryPage($page, $size);
		
		$this->display($data, $tpl);
	}
}